import Vue from 'vue'
import App from './App.vue'
import './styles/common.less'

Vue.config.productionTip = false
Vue.directive('color', {
  // inserted 是dom节点插入到html中的时候
  inserted(el, binding) {
    console.log(binding);
    el.style.color = binding.value
  },
  // update 当指令绑定的值发生变化  会触发
  update(el, binding) {
    console.log(el, binding);
    el.style.color = binding.value
  }
})

new Vue({
  render: h => h(App)
}).$mount('#app')
